import request from "@/api/index.js";

export const algin = (params) => {
  return request({
    method: "GET", //请求方法
    url: "/api/nsc/weroad/getCookie", //请求地址
    params,
  });
};

// 用户登录暂时不启用
// export const logins = params => {
//     return request({
//        method: 'GET', //请求方法
//        url: '/api/nsc/uc/ndConfig/findNdConfigByKey', //请求地址
//        params //接受请求
//     })
//  };
// 获取合作伙伴接口
export const getPartner = () => {
  return request({
    method: "GET",
    url: "/api/nsc/front/ndPartner/list",
  });
};
// 保存合作伙伴
export const savePartner = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndPartner/saveOrUpdate",
    data,
  });
};
// 删除合作伙伴
export const deletePartner = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndPartner/del/multiple",
    data,
  });
};
// 根据id查询合作伙伴接口
export const getsearch = (params) => {
  return request({
    method: "GET",
    url: "/api/nsc/admin/ndPartner/getInfoById/" + params.id,
  });
};
//查询合作伙伴接口
export const getPartnerSearch = () => {
  return request({
    method: "GET",
    url: "/api/nsc/admin/ndPartner/list",
  });
};
// 分页查询合作伙伴接口
export const searchPage = (params) => {
  return request({
    method: "GET",
    url: "/api/nsc/admin/ndPartner/page",
    params,
  });
};

// 导航配置结构
export const ndFrontMenu = (params) => {
  return request({
    method: "GET",
    url: "/api/nsc/front/ndFrontMenu/list",
    params,
  });
};
// 根据id查询导航Tab配置接口
export const getInfoById = (params) => {
  return request({
    method: "GET",
    url: "/api/nsc/admin/ndFrontMenuTab/getInfoById/" + params.menuId,
  });
};
// 根据导航搜索内容查询的接口
export const getInfosByName = (params) => {
  return request({
    method: "GET",
    url: "/api/nsc/admin/ndFrontMenu/getInfosByName",
    params,
  });
};
// 新增导航接口(导航配置页)
export const addNav = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndFrontMenu/add",
    data,
  });
};
// 修改导航接口(导航配置页)
export const updateNav = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndFrontMenu/update",
    data,
  });
};

// 保存导航Tab信息接口
export const saveOrUpdate = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndFrontMenuTab/saveOrUpdate",
    data,
  });
};
// 上传图片的接口
export const uploads = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/material/uploads",
    data,
  });
};
// 批量删除导航Tab信息
export const delUploads = (data) => {
  return request({
    method: "POST",
    url: "/api/nsc/admin/ndFrontMenuTab/del/multiple",
    data,
  });
};
